package com.share.finance.fund.model.db;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 放款记录
 * </p>
 *
 * @author author
 * @since 2024-09-02
 */
@Data
@Accessors(chain = true)
@TableName("fun_loan_info")
public class LoanInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 产品编码
     */
    @TableField(value = "product_code")
    private String productCode;
    /**
     * 全局会话ID
     */
    @TableField(value = "session_id")
    private String sessionId;
    /**
     * 资金方返回的借据编号
     */
    @TableField(value = "due_bill_no")
    private String dueBillNo;
    /**
     * 用户id
     */
    @TableField(value = "user_id")
    private String userId;
    /**
     * 用户名称
     */
    private String name;
    /**
     * 手机号码
     */
    @TableField(value = "phone_no")
    private String phoneNo;
    /**
     * 收款银行卡号
     */
    @TableField(value = "bank_card")
    private String bankCard;
    /**
     * 身份证号
     */
    @TableField(value = "id_card")
    private String idCard;
    /**
     * 资金方编码
     */
    @TableField(value = "fund_code")
    private String fundCode;
    /**
     * 还款方式 等额本息-1, 等额本金-0
     */
    @TableField(value = "repay_method")
    private Integer repayMethod;
    /**
     * 借款金额
     */
    @TableField(value = "loan_amount")
    private Double loanAmount;
    /**
     * 对客年化利率=[担保方年化利率+资金方年化利率+资产方年化利率]
     */
    @TableField(value = "customer_rate")
    private Double customerRate;
    /**
     * 担保方年化利率
     */
    @TableField(value = "guarantor_rate")
    private Double guarantorRate;
    /**
     * 资金方年化利率
     */
    @TableField(value = "fund_rate")
    private Double fundRate;
    /**
     * 资产方年化利率[可能是线下结算]
     */
    @TableField(value = "property_rate")
    private Double propertyRate;
    /**
     * 逾期罚息年化利率
     */
    @TableField(value = "overdue_rate")
    private Double overdueRate;
    /**
     * 还款期数[月]: 3,6,9,12
     */
    @TableField(value = "repay_period")
    private Integer repayPeriod;
    /**
     * 还款宽松天数
     */
    @TableField(value = "grace_period")
    private Integer gracePeriod;
    /**
     * 放款状态：0-放款申请中,1-放款成功,2-放款失败
     */
    private Integer status;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

}
